package me.croute.calendarexample.activity;

import java.util.Calendar;

import android.content.Context;
import android.text.format.DateFormat;

public class Alarms {
	
	private final static String M12 = "h:mm aa";
	//for sharing
	public static String M24 = "kk:mm";
	
	
	
	public static String formatTime(final Context context, Calendar c){
		
		String format = get24HourMode(context) ? M24 : M12;
		
		return (c == null) ? "" : (String)DateFormat.format(format, c);
	}
	
	/*
	public static String formatTime(final Context context, int hour, int minute){
		
		Calendar c = calculateAlarm(hour, minute);
		
		return formatTime(context,c);
	}
	*/

	
	public static boolean get24HourMode(Context context){
		return android.text.format.DateFormat.is24HourFormat(context);
	}

}
